package com.glut.forum.common.utils;

import org.springframework.util.DigestUtils;

import java.nio.charset.StandardCharsets;
import java.util.UUID;

/**
 * @author milo
 * @version 1.0
 * @since 2021/9/6 下午3:26
 */
public class UserUtil {

    public static String getUUID() {
        return UUID.randomUUID().toString();
    }

    public static String encryptPwd(String pwd) {
        return DigestUtils.md5DigestAsHex(pwd.getBytes(StandardCharsets.UTF_8));
    }
}
